{% extends "level_base.html" %}

<script>
  var round = 0;
</script>
{% block form %}
  {% if display_form %}
    <h5>What is your bet?</h5>
    <form action="/level3" method="post" name="bet_form" onsubmit="return checkBet();">
      <div id="bet_div"><input type="text" name="bet" value="1" /></div>
      <div><input type="submit" name="submit_button" value="Submit"></div>
    </form>
  {% endif %}
{% endblock form %}

{% block result %}
  {% if game %}
    <h4>My money: {{ game.bet_amount }}</h4>
    <div class=img_table_1>
      <table height="450" width="600">
        <tr align="center"><td>
          {% for my_image in my_images %}
            <img src="{{ my_image }}" />
          {% endfor %}
        </td></tr>
        <tr align="center" height="150"><td>
          {% for table_image in table_images %}
            <img src="{{ table_image }}" />
          {% endfor %}
        </td></tr>
        <tr align="center"><td>
          {% for your_image in your_images %}
            <img src="{{ your_image }}" />
          {% endfor %}
        </td></tr>
      </table>
    </div>
    <h4>Your money: {{ game.bet_amount }}</h4>
    {% if display_form %}
      <h5>{{ game.message }}</h5>
    {% else %}
      <form action="/level3" method="post" name="deal_form">
        <div><input type="submit" name="submit_button" value="Deal"></div>
      </form>
    {% endif %}
  {% endif %}
{% endblock result %}